Skip to content

refactor(dfir_lang): remove stratum, add push codegen for lattice_fold, lattice_reduce, _lattice_fold_batch#2970

Open
MingweiSamuel wants to merge 2 commits into
mainfrom
mingwei/newpush-latticefold
Open

refactor(dfir_lang): remove stratum, add push codegen for lattice_fold, lattice_reduce, _lattice_fold_batch#2970
MingweiSamuel wants to merge 2 commits into
mainfrom
mingwei/newpush-latticefold

Conversation

@MingweiSamuel

Copy link
Copy Markdown
Member

No description provided.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploying hydro with  Cloudflare Pages  Cloudflare Pages

Latest commit: bfc267f
Status: ✅  Deploy successful!
Preview URL: https://34fad758.hydroflow.pages.dev
Branch Preview URL: https://mingwei-newpush-latticefold.hydroflow.pages.dev

View logs

@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-latticefold branch from 66afb59 to 869360d Compare June 19, 2026 20:59
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch from cfdd3bb to 73a8e26 Compare June 19, 2026 20:59
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-latticefold branch from 869360d to c931247 Compare June 19, 2026 21:02
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch from 73a8e26 to f170cf6 Compare June 19, 2026 21:02
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-latticefold branch from c931247 to 622f695 Compare June 19, 2026 22:05
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch from f170cf6 to 275834c Compare June 19, 2026 22:05
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-latticefold branch 2 times, most recently from b3b3204 to 2e25dc3 Compare June 19, 2026 23:03
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch from 275834c to 5be7095 Compare June 19, 2026 23:03
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-latticefold branch from 2e25dc3 to 59d1ce2 Compare June 20, 2026 01:27
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch 2 times, most recently from 5f1f6ac to 0177c8e Compare June 20, 2026 17:11
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-latticefold branch 2 times, most recently from 18b7869 to d1ebaa7 Compare June 21, 2026 00:09
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch from 0177c8e to 774fd27 Compare June 21, 2026 00:09
@MingweiSamuel MingweiSamuel marked this pull request as ready for review June 22, 2026 16:48
Copilot AI review requested due to automatic review settings June 22, 2026 16:48
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch from 774fd27 to fe64bfe Compare June 22, 2026 16:49
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-latticefold branch from d1ebaa7 to 080af6c Compare June 22, 2026 16:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors DFIR language operator codegen for lattice folding/reducing operators by removing monotone-accum delay barriers and allowing lattice_fold / lattice_reduce to be codegenerated in non-pull contexts, with corresponding updates to graph visualization snapshots in dfir_rs tests.

Changes:

  • Remove DelayType::MonotoneAccum input delay typing from lattice_fold, lattice_reduce, and _lattice_fold_batch operator constraints.
  • Make lattice_reduce codegen conditional on is_pull (only inject pull-specific type checks when in pull mode).
  • Update graphvis Mermaid/DOT snapshots to reflect the simplified graph structure (fewer handoffs / different subgraph clustering) resulting from barrier removal and fusion changes.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
dfir_lang/src/graph/ops/lattice_reduce.rs Removes monotone-accum delay typing and gates pull-only input trait checks behind is_pull.
dfir_lang/src/graph/ops/lattice_fold.rs Removes monotone-accum delay typing and delegates to fold without asserting pull-only mode.
dfir_lang/src/graph/ops/_lattice_fold_batch.rs Removes monotone-accum delay typing for the batch-fold fusion operator (still pull-only).
dfir_rs/tests/snapshots/surface_singleton__fold_cross@graphvis_mermaid.snap Snapshot update reflecting new graph edges/subgraph layout after barrier removal.
dfir_rs/tests/snapshots/surface_singleton__fold_cross@graphvis_dot.snap DOT snapshot update matching the new graph structure.
dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick@graphvis_mermaid.snap Snapshot update reflecting handoff/barrier changes in the generated graph.
dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick@graphvis_dot.snap DOT snapshot update matching the new graph structure.
dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_tee@graphvis_mermaid.snap Snapshot update reflecting handoff/barrier changes in the generated graph.
dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_tee@graphvis_dot.snap DOT snapshot update matching the new graph structure.
dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_identity@graphvis_mermaid.snap Snapshot update reflecting handoff/barrier changes in the generated graph.
dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_identity@graphvis_dot.snap DOT snapshot update matching the new graph structure.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch from fe64bfe to efcc46e Compare June 22, 2026 21:40
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-latticefold branch 2 times, most recently from 15e1108 to 9c98e2d Compare June 22, 2026 21:40
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch from efcc46e to d08ff6c Compare June 22, 2026 21:40
#write_iterator
}
} else {
write_iterator

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for type guards in the push version?

@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch from d08ff6c to f5c2ee5 Compare June 24, 2026 02:55
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-latticefold branch 2 times, most recently from 7282015 to bfc267f Compare June 24, 2026 02:56
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch from f5c2ee5 to 0d99a0e Compare June 24, 2026 02:56
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-latticefold branch from bfc267f to 2f4c8ad Compare June 24, 2026 02:57
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch 2 times, most recently from 1e71fe5 to 23d59a1 Compare June 24, 2026 02:57
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-latticefold branch from 2f4c8ad to 04e3def Compare June 24, 2026 02:57
MingweiSamuel and others added 2 commits June 24, 2026 03:05
…mut`, `persist_mut_keyed`

PR: #2969

Remove unnecessary Vec allocation in persist_mut push-side and add second-tick test assertions

- dfir_lang/src/graph/ops/persist_mut.rs: Removed `.collect::<Vec<_>>()` from
  the push-side `flat_map` closure. The iterator from `state.iter().cloned()` is
  now streamed directly without an intermediate allocation. Added a `check_push`
  helper function (matching the pattern used in `persist_mut_keyed.rs`) to properly
  handle the lifetime of the borrowed state reference.

- dfir_rs/tests/surface_push_blocking.rs: Updated `test_persist_mut_push` and
  `test_persist_mut_keyed_push` to use `source_stream` instead of `source_iter`
  and added second-tick assertions that verify the persistence operator replays
  its current state on subsequent ticks.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2969
…ld`, `lattice_reduce`, `_lattice_fold_batch`

PR: #2970
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-latticefold branch from 04e3def to e5d268f Compare June 24, 2026 03:05
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-persist branch from 23d59a1 to 0b3f613 Compare June 24, 2026 03:05
Base automatically changed from mingwei/newpush-persist to main June 24, 2026 03:05
@MingweiSamuel MingweiSamuel requested a review from a team June 24, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants